package com.example.zhunongzonghe.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 
 * @TableName zn_farm_evaluate
 */
@TableName(value ="zn_farm_evaluate")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ZnFarmEvaluate implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    /**
     * 主键，农产品评价表
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 属于那个用户
     */
    @TableField(value = "username")
    private String username;

    /**
     * 属于哪个农产品
     */
    @TableField(value = "farm_id")
    private Integer farmId;

    /**
     * 属于哪个规格
     */
    @TableField(value = "farm_spec_id")
    private Integer farmSpecId;

    /**
     * 评价内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 评分
     */
    @TableField(value = "score")
    private Integer score;

    /**
     * 属于哪个订单
     */
    @TableField(value = "order_id")
    private Integer orderId;
    /**
     * 属于哪个订单详情内的哪个农产品
     */
    @TableField(value = "details_id")
    private Integer detailsId;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;

}